Skip to content

test(sprite3d): cover the WebGL draw path + CHANGELOG highlight#1519

Merged
obiot merged 1 commit into
masterfrom
test/sprite3d-webgl-coverage
Jun 26, 2026
Merged

test(sprite3d): cover the WebGL draw path + CHANGELOG highlight#1519
obiot merged 1 commit into
masterfrom
test/sprite3d-webgl-coverage

Conversation

@obiot

@obiot obiot commented Jun 25, 2026

Copy link
Copy Markdown
Member

What

Follow-up to #1513. Closes the one test gap identified during pre-release review: Sprite3d was never drawn through the WebGL path — the other specs run under Canvas and test the billboard/atlas/flip math directly, so Sprite3d.draw → WebGLRenderer.drawMesh → MeshBatcher (texture upload, uAlphaCutoff uniform, atlas UVs reaching the GPU) was only ever validated by the Billboard example screenshot. That's exactly where the getTexture regression once hid.

New spec — tests/sprite3d_webgl.spec.js

Drives real Sprite3d instances through drawMesh/MeshBatcher under a Camera3d and asserts the draw reaches the GPU (drawElements > 0) without throwing:

  • plain-image Sprite3d (the getTexture / atlas-resolution case)
  • animated spritesheet (atlas UVs uploaded after a frame advance)
  • alphaCutoff default 0.5 and the alphaCutoff: 0 path (uniform set both ways)
  • a flipped sprite

Runs under software WebGL (failIfMajorPerformanceCaveat: false); skips when WebGL2 is unavailable — same harness as webgl_mesh_depth.spec.js, so it's CI-safe.

Also

Adds Sprite3d / 2.5D to the 19.8 CHANGELOG Highlights line (it was glTF-only).

Verified locally: the new spec runs (4 pass, not skipped) under software WebGL; full suite 4403 passing.

🤖 Generated with Claude Code

Follow-up to #1513. Adds an automated WebGL draw smoke for Sprite3d — the
path that was previously only validated by the Billboard example screenshot
(and where the getTexture regression once hid). `tests/sprite3d_webgl.spec.js`
drives real Sprite3d instances through `WebGLRenderer.drawMesh` → `MeshBatcher`
under a Camera3d and asserts the draw reaches the GPU (`drawElements > 0`)
without throwing:
- plain-image Sprite3d (the getTexture/atlas-resolution case)
- animated spritesheet (atlas UVs uploaded)
- alphaCutoff default 0.5 + the alphaCutoff:0 path (uniform set)
- a flipped sprite

Runs under software WebGL (failIfMajorPerformanceCaveat:false); skips when
WebGL2 is unavailable, mirroring the existing webgl_mesh_depth harness.

Also adds Sprite3d / 2.5D to the 19.8 CHANGELOG Highlights line (it was
glTF-only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@obiot obiot merged commit 340da34 into master Jun 26, 2026
6 checks passed
@obiot obiot deleted the test/sprite3d-webgl-coverage branch June 26, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant